
if(anchor.get("data-nocache")){anchor.eliminate("dialog")
}$(dialog).fade();
boundOuterClick=outerClick.bind(dialog);
$(dialog).addEvent("outerClick",boundOuterClick);
document.addEvent("keydown",function(event){if(event.key=="esc"){$(this).fade("out")
}}.bind(dialog))
}var position,relative,dialog,content=anchor.get("data-string")||$$(anchor.get("data-dialog"))[0],boundary=$$(anchor.get("data-boundary"))[0]||document.body,timeout=anchor.get("data-timeout")||4000;
boundary=boundary.getCoordinates();
content=content||anchor.get("href");
Object.each(anchor.attributes,function(attr){if(typeof attr==="object"&&attr.name.indexOf("data-")===0){var dataAttr=attr.name.replace(/(data\-|of)/gi,"");
    if(isOrientation(dataAttr)){position=dataAttr;
        relative=$(attr.value)||$$(attr.value)[0]
    }}});
dialog=new Dialog(content,{request:{data:(zopt&&zopt.csrf)?{csrf:zopt.csrf}:null,method:"get"},timeout:timeout,position:{position:position||"top",relativeTo:relative||anchor,edge:anchor.get("data-edge")||"bottom",minimum:{x:boundary.left,y:boundary.top},maximum:{x:boundary.right,y:boundary.bottom}},onFailure:function(err,xhr){$(this).set("html",xhr.response).fade("in");
    this.fireEvent("onReady")
},onReady:function(){$(this).position(this.options.position);
    $(this).addClass("arrow"+this.options.position.edge);
    $(document.body).setStyle("cursor","default");
    if(this.options.timeout>0){var fadeOut=function(){$(this).fade("out")
    };
        fadeOut.delay(this.options.timeout,this)
    }},onLoadStart:function(){$(document.body).setStyle("cursor","progress")
}});
if($(dialog).get("html")===""){dialog.loadContent()
}$(dialog).addClass("speech").fade("hide");
$(dialog).setStyle("display","block");
anchor.store("dialog",dialog);
toggleDialog()
});
switch($(document.body).get("id")){case"fbc":$("name").setCaretPosition("end");
    case"loginregister":utils.checkName($("name").get("value"));
        $("name").addEvent("keyup",function(event){utils.checkName(this.value)
        });
        setTimeout("touchLoginFields()",300);
        break;
    case"home":$$("a.fptab").addEvent("click",function(event){event.stop();
        $("featuredPeopleList").load(this.rel);
        $(this).getParent().getSiblings().removeClass("active");
        $(this).getParent().addClass("active")
    });
        break;
    case"item":var even=false;
        $("sharebutton").addEvent("click",function(event){(function(){$("sharebyurl")[["blur","focus"][+even]]()
        }).delay(50);
            even=even?false:true
        });
        $("favorite").addEvent("click",function(event){event.preventDefault();
            this.toggleClass("favorited")
        });
        $("rating").addEvent("click:relay(a)",function(event,anchor){event.preventDefault();
            anchor.eliminate("dialog");
            $("rate").eliminate("dialog");
            anchor.getParent(".dialog").fade("out")
        });
        var _ga=_ga||{};
        var _gaq=_gaq||[];
        window.fbAsyncInit=function(){FB.Event.subscribe("edge.create",function(targetUrl){_gaq.push(["_trackSocial","facebook","like",targetUrl])
        });
            FB.Event.subscribe("edge.remove",function(targetUrl){_gaq.push(["_trackSocial","facebook","unlike",targetUrl])
            });
            FB.Event.subscribe("message.send",function(targetUrl){_gaq.push(["_trackSocial","facebook","send",targetUrl])
            })
        };
        (function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];
            if(d.getElementById(id)){return
            }js=d.createElement(s);
            js.id=id;
            js.src="//connect.facebook.net/en_US/all.js#xfbml=1&appId="+zopt.FB_APPID;
            fjs.parentNode.insertBefore(js,fjs)
        })(document,"script","facebook-jssdk");
        window.twttr=(function(d,s,id){var t,js,fjs=d.getElementsByTagName(s)[0];
            if(d.getElementById(id)){return
            }js=d.createElement(s);
            js.id=id;
            js.src="//platform.twitter.com/widgets.js";
            fjs.parentNode.insertBefore(js,fjs);
            return window.twttr||(t={_e:[],ready:function(f){t._e.push(f)
            }})
        }(document,"script","twitter-wjs"));
        _ga.trackTwitterHandler_=function(intent_event,opt_pagePath){var opt_target;
            if(intent_event&&intent_event.type=="tweet"||intent_event.type=="click"){if(intent_event.target.nodeName=="IFRAME"){opt_target=_ga.extractParamFromUri_(intent_event.target.src,"url")
            }var socialAction=intent_event.type+((intent_event.type=="click")?"-"+intent_event.region:"");
                _gaq.push(["_trackSocial","twitter",socialAction,opt_target])
            }};
        _ga.trackTwitter=function(opt_pagePath){intent_handler=function(intent_event){_ga.trackTwitterHandler_(intent_event,opt_pagePath)
        };
            twttr.events.bind("click",intent_handler);
            twttr.events.bind("tweet",intent_handler)
        };
        _ga.extractParamFromUri_=function(uri,paramName){if(!uri){return
        }var regex=new RegExp("[\\?&#]"+paramName+"=([^&#]*)");
            var params=regex.exec(uri);
            if(params!=null){return unescape(params[1])
            }return
        };
        twttr.ready(function(twttr){_ga.trackTwitter()
        });
        break
}utils.addScript("https://apis.google.com/js/plusone.js");
var players=$$("[mediagroup=zedge]");

if(players.length&&Browser.Features.audio){var group=new AudioGroup(players,{onPause:function(current){current.getParent(".audio").removeClass("pause")
},onStop:function(current){current.getParent(".audio").removeClass("pause")
},onPlay:function(current){current.getParent(".audio").addClass("pause");
    current.getPrevious(".carret").setStyle("-webkit-animation-duration",Math.round(current.duration)+"s")
}});
    players.each(function(el,i){var audio=new Element("a.audio",{"data-player":i,href:"#",events:{click:function(event){event.stop();
        group.toggle(this.get("data-player"),true)
    }}}).wraps(el);
        new Element(".visualizer").inject(audio,"top");
        new Element(".carret").inject(audio,"top");
        new Element(".player").inject(audio,"top")
    })
}}function zedgeHeaderReady(){var so=$("shoutout");
    var accountMenu=$$("#accountMenu .dropdown")[0];
    if(so){so.addEvents({focus:function(event){accountMenu.locked=true
    },blur:function(event){accountMenu.locked=false;
        if(!accountMenu.mouseOver){accountMenu.fireEvent("mouseleave",event)
        }},keyup:function(event){if(event.key&&event.key=="esc"){this.blur(event)
    }$("shoutsubmit").erase("disabled")
    },})
    }}
function isOrientation(orient){if(typeof orient!=="string"){return false
}return orient.match(/(left|right|upper|top|lower|bottom|center){1,2}/gi)
}
if(typeof console=="undefined"){console={version:"0.0.1",debug:function(){},dir:function(){},dirxml:function(){},error:function(){},group:function(){},groupEnd:function(){},info:function(){},log:function(){},profile:function(){},profileEnd:function(){},time:function(){},timeEnd:function(){},trace:function(){},warn:function(){}}
}

var rtp_playing="none";
function rtpMakeCall(str){if($(rtp_playing)){$(rtp_playing).rtpAsFunction("stopplay")
}}function rtpJsFunction(aString){if(rtp_playing!="none"&&rtp_playing!=aString){rtpMakeCall(rtp_playing)
}rtp_playing=aString
}function rtpRefresh(rt_player){if(rt_player&&rt_player.rtpAsRefresh){rt_player.rtpAsRefresh("over")
}}var RecaptchaOptions={theme:"white"};
function touchLoginFields(){$$("form#frm_login input.grid_3").each(function(em){em.focus();
    em.blur()
})
}function redirect(uri){window.location.href=uri
};
